#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;

int main()
{
	const int a=6; 
	int weight[a];
	for (int i = 0; i < a; ++i)
	{
		cin >> weight[i];
	}
	int max = weight[0];

	for (int i = 0; i < a; ++i)
	{
		if (max > weight[i + 1]) max = max;
		else max = weight[i + 1];
	}
	cout << max;
	return 0;
}